import { defineStore } from 'pinia'

export const useUserStore = defineStore('user', {
    state: () => {
        return {
            userInfo: {},
        }
    },
    actions: {

    },
    // 开启数据缓存,默认是存在sessionStorage
    persist: {
        enabled: true,
        strategies: [
            {
                key: 'userInfo',//设置存储的key
                storage: localStorage,//表示存储在localStorage
            }
        ]
    },
    getters: {

    }
})